package com.jason.product.controller;

import com.jason.product.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/product")
public class ProductController {
    @Autowired
    ProductService productService;

    @RequestMapping("/reduceNumberr")
    public int reduceNumber(@RequestParam("id") int id,@RequestParam("number")  int number){
        return productService.reduceNumber(id,number);
    }

}
